The present invention relates to a starting system for memory resident process groups in MS-DOS, and more particularly to a starting system for minimizing the memory region which is left unusable at the completion of the starting process.
Recently, total and integrated office automation has been realized by using micro-mainframe links for connecting personal computers and workstations to a host computer. To enable the micro-mainframe link to be used effectively by the user, it is necessary to provide personal computers with a software library including various services. The software library usually comprises a plurality of resident process groups in the main memory of the personal computer.
After the user logs on to the personal computer he calls the software library and then starts it. The necessary process group is resident in the main memory and can be prepared for immediate operation. If the library does not stay resident in the main memory, a high speed response cannot be achieved when an execution request is made and then a computer system fails to operate at a high speed. In a personal computer system using MS-DOS as an operating system, the starting module including all the processes necessary for starting is conventionally carried out under MS-DOS and the process group is put in an executable state. FIG. 1A shows an operational flowchart of the conventional starting module.
The starting module is designed to perform a process which does not stay resident in the memory. Under MS-DOS, this starting module is loaded and executed by a starting command. Then it carries out an analysis (S70) of a parameter attached to the starting command and a check of the starting environment (S71) for confirming the starting state of the system area which should have been already started. Thereafter, the starting module executes a first process 1 from the process group by using the load and execution commands (S73). Process 1 executed by the starting module enables the process 1 itself to stay resident in the memory and returns the control to the starting module of the calling source. The starting module then performs a starting process for process 1 (S74), enabling process 1 to be in an executable state, namely, in a state in which an event occurrence is being waited. Thus, the starting process of process 1 is completed.
The starting module executes starting process 2 to process n by repeating procedures S73 and S74, thereby enabling processes 2-n to be in an executable state. When all the processes of the process group have been subject to load and execution (the YES branch from S72), the following process (other process in S75) is executed, and then the starting process is completed. The starting module is designed as a memory-non-resident process, whereby MS-DOS deletes the starting module from the memory when all the processes of the starting module have been completed.
FIG. 1B shows a memory arrangement in the conventional starting system for using the starting module described above. The memory arrangement changes are shown in (1)-(4) in accordance with the progress of the starting process.
The starting module is loaded under the MS-DOS operating system in the main memory, namely, in an address following the address in which the MS-DOS is stored and is thereafter executed (1 in FIG. 1A). After the starting module has performed an analysis of a parameter (S70 in FIG. 1A) and a check of the starting environment (S71 in FIG. 1A), a process 1 is loaded in the memory area which follows that of the starting module and then is executed (S73 in FIG. 1A). This execution is to obtain a memory area which is used when a request for the execution of the process 1 is made. After process 1 itself has been made to stay resident in the memory, the starting module puts process 1 in an executable state, namely, starts process 1, by means of the starting process (S74 in FIG. 1A). This starting process registers a task for waiting an occurrence of an event. As a result, process 1 stays resident in the area following the starting module in the memory shown in (2) of FIG. 1B.
When the above processes (S72-S74 in FIG. 1A) are repeated for processes 2 to n, and when all the processes (processes 1 to n) are put in an executable state (as the branch YES of S72 in FIG. 1A) the memory arrangement is formed as shown in (3) of FIG. 1B such that processes 1 to n stay resident in parallel in the memory region following that of the starting module. Next, the starting module executes any other process (S75 in FIG. 1A) and then it is deleted from the memory. As a result, on completion of starting of processes 1 to n, the memory region in which the starting module is loaded remains as unused area in the memory as indicated by (4) in FIG. 1B. Conventionally, the size of the starting module is 9 Kbytes and this 9 Kbytes usually remains unusable.
Further, there is a high possibility that the function of the starting module will later be further expanded. In this case, the capacity of the starting module will become even larger, thereby increasing the unused memory area remaining after completion of the starting process.
When the process group forming the above-mentioned software library is made to stay resident in memory under MS-DOS, the used memory capacity must be minimized. If the capacity of the main memory is 1 Mbyte, the remaining area is judged to be about 256 Kbytes excluding the memory area which the MS-DOS operating system and other system software occupy. Therefore, if the user wishes to preserve at least 128 Kbytes, the capacity of the memory used by the memory resident process group must be less than 128 Kbytes.
However, optimization of the memory resident process group has already been advanced and further the process has been written in C-language, making it extremely difficult to decrease the unused program area by even 1 Kbyte in the program.
Reduction of the useless memory capacity (which is currently about 9 Kbytes and which may increase in accordance with the expansion of its function in the future), corresponding to the starting module and remaining after starting memory resident process group, is very important.